package com.y5neko.RadiantKnightExploit.exp;

public class VulTypes {
    public static String[] ShiroVulTypes = {"Shiro550", "Shiro721"};
    public static String[] FastJsonVulTypes = {"FastJson1224"};
    public static String[] WeblogicVulTypes = {"Weblogic"};

    /**
     * 获取漏洞中文别称
     * @param vulType 漏洞类型
     * @return 漏洞中文别称
     */
    public static String getVulTypeString(String vulType){
        switch (vulType) {
            default:
                return vulType;
            case "Shiro550":
                return "Shiro反序列化";
            case "FastJson1224":
                return "FastJson反序列化";
        }
    }

    public static String getVulType(String assetType) {
        switch (assetType) {
            default:
            case "Shiro":
                return ShiroVulTypes[0];
            case "FastJson":
                return FastJsonVulTypes[0];
            case "Weblogic":
                return WeblogicVulTypes[0];
        }
    }

    public static String[] getVulTypes(String assetType) {
        switch (assetType) {
            default:
            case "Shiro":
                return ShiroVulTypes;
            case "FastJson":
                return FastJsonVulTypes;
            case "Weblogic":
                return WeblogicVulTypes;
        }
    }
}
